animate matplotlib plot